package com.ymatou.iapi.sellertrade.service;

import com.google.gson.Gson;
import com.ymatou.iapi.sellertrade.parameter.GetOrderDetailRequestJavaBean;
import com.ymatou.iapi.sellertrade.response.GetOrderListResponseJavaBean;
import com.ymttest.business.YmatouAutoTestCall;
import com.ymttest.utils.EnvSetup;

public class GetOrderDetailJavaCall extends YmatouAutoTestCall{
	
	private static String opurl = "/api/orderquery/getOrderDetail";
	
	public GetOrderDetailJavaCall(){
		super(EnvSetup.getSystemUrl("sellertrade_iapi"),opurl,"GET","PARAM");
	}

	public void addDefHeader(){
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		GetOrderDetailRequestJavaBean request = new GetOrderDetailRequestJavaBean();
		GetOrderDetailJavaCall call = new GetOrderDetailJavaCall();
		
		request.setOrderId(1721288699);
		request.setSellerId(24635724);
		
		String json = call.callAndGetReturnData(request).toString();
		
		GetOrderListResponseJavaBean response = new Gson().fromJson(json, 
				GetOrderListResponseJavaBean.class);
		
		System.out.println(response);
	}
}
